In audio equipment, the gain of an audio signal is typically controlled in steps. However, a step in gain can result in an abrupt change in the audio signal, which can result in an undesired audible click. In other equipment where gain is controlled, a similar problem can arise with non-audio signals where gain is controlled, as a change in gain can introduce an undesired disturbance or distortion into the signal.
One way of addressing this problem is to implement the change of gain when the signal is zero. This involves the detection of zero crossings in a signal. An example of such as scheme is illustrated in FIG. 1.
Referring to FIG. 1, a signal processing apparatus has a variable gain stage 10 which has an input 12 for a signal to be processed. An output of the variable gain stage 10 is coupled to an input 22 of a signal processing stage 20, and the signal processing stage 20 has an output 24 for the signal after it has been processed by the variable gain stage 10 and the signal processing stage 20. The variable gain stage 10 has an input 14 for a control signal which it employs to determine when to adjust the gain applied to the signal. A zero crossing detector 30 has an input coupled to the output 24 of the signal processing stage 20 for detecting when the signal is zero. The zero crossing detector 30 generates the control signal and has an output coupled to the input 14 for delivering the control signal to the variable gain stage 10.
The zero crossing detector 30 may employ a comparator to determine whether the signal is above or below a reference level. For a signal processing apparatus operating from first and second supply voltages VDD, VSS, the reference level may be ideally the average of the supply voltages, (VDD+VSS)/2. For example, if the supply voltages VDD, VSS are equal in magnitude and opposite in polarity, the reference level may be ideally zero, and if one of the supply voltages VSS is zero, the reference level may be ideally half the other of the supply voltages, VDD/2. Any error in the level detected will affect the time at which the gain is adjusted. For example, if the zero crossing detector 30 has a detection threshold that is too high, a downward crossing would be detected too early and an upwards crossing would be detected too late. Conversely, if the zero crossing detector 30 has a detection threshold that is too low, a downward crossing would be detected too late and an upwards crossing would be detected too early. The magnitude of the timing error depends on the gradient of the signal at the crossing. The zero crossing detector 30 can be designed to have a very low DC offset, but such a design is costly in terms of silicon area and power consumption.
There is a requirement for improved threshold crossing detection.